package anchors

import (
	"fmt"
	"regexp"
)

func SimpleAnchor() {
	matched, _ := regexp.MatchString(`^I am here`, " I am here")
	fmt.Println(matched) // false

	matched2, _ := regexp.MatchString(`I am here$`, " I am here")
	fmt.Println(matched2) // true

	matched3, _ := regexp.MatchString(`\bcat\b`, "Black cat meow")
	fmt.Println(matched3) // true

	matched4, _ := regexp.MatchString(`\Bcat\b`, "Blackcat meow")
	fmt.Println(matched4) // true
}
